package com.ruoyi.stock.service.impl;

import java.util.List;

import com.ruoyi.stock.domain.vo.WarehouseOutVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.stock.mapper.WarehouseOutMapper;
import com.ruoyi.stock.domain.WarehouseOut;
import com.ruoyi.stock.service.IWarehouseOutService;

/**
 * 出库Service业务层处理
 *
 * @author YwaiX
 * @date 2024-10-29
 */
@Service
public class WarehouseOutServiceImpl implements IWarehouseOutService {
    @Autowired
    private WarehouseOutMapper warehouseOutMapper;

    /**
     * 查询出库
     *
     * @param id 出库主键
     * @return 出库
     */
    @Override
    public WarehouseOut selectWarehouseOutById(Long id) {
        return warehouseOutMapper.selectWarehouseOutById(id);
    }

    /**
     * 查询出库列表
     *
     * @param warehouseOut 出库
     * @return 出库
     */
    @Override
    public List<WarehouseOutVo> selectWarehouseOuts(WarehouseOutVo warehouseOut) {
        return warehouseOutMapper.selectWarehouseOuts(warehouseOut);
    }

    @Override
    public List<WarehouseOut> selectWarehouseOutList(WarehouseOut warehouseOut) {
        return warehouseOutMapper.selectWarehouseOutList(warehouseOut);
    }

    /**
     * 新增出库
     *
     * @param warehouseOut 出库
     * @return 结果
     */
    @Override
    public int insertWarehouseOut(WarehouseOut warehouseOut) {
        return warehouseOutMapper.insertWarehouseOut(warehouseOut);
    }

    /**
     * 修改出库
     *
     * @param warehouseOut 出库
     * @return 结果
     */
    @Override
    public int updateWarehouseOut(WarehouseOut warehouseOut) {
        return warehouseOutMapper.updateWarehouseOut(warehouseOut);
    }

    /**
     * 批量删除出库
     *
     * @param ids 需要删除的出库主键
     * @return 结果
     */
    @Override
    public int deleteWarehouseOutByIds(Long[] ids) {
        return warehouseOutMapper.deleteWarehouseOutByIds(ids);
    }

    /**
     * 删除出库信息
     *
     * @param id 出库主键
     * @return 结果
     */
    @Override
    public int deleteWarehouseOutById(Long id) {
        return warehouseOutMapper.deleteWarehouseOutById(id);
    }
}
